import { ref, Ref } from "vue";

/**
 * AudioComponent
 */
export default class AudioComponent {
    private static instance: AudioComponent = new AudioComponent();
    /**
     * AudioComponent
     */
    public static get Default(): AudioComponent {
        return this.instance;
    }

    constructor() {
        window.addEventListener('unload', this.Dispose.bind(this));
    }

    Dispose() {
        window.removeEventListener('unload', this.Dispose);
    }

    public Volume: Ref<number> = ref(50);
}